/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.gov.ana.entities;

import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author lucas.nunes
 */
@Entity
@Table(name = "QLTTB_ESTACAO")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Estacao.findAll", query = "SELECT e FROM Estacao e"),
    @NamedQuery(name = "Estacao.findByEstId", query = "SELECT e FROM Estacao e WHERE e.estId = :estId"),
    @NamedQuery(name = "Estacao.findByEstNm", query = "SELECT e FROM Estacao e WHERE e.estNm = :estNm"),
    @NamedQuery(name = "Estacao.findByEstCdPlu", query = "SELECT e FROM Estacao e WHERE e.estCdPlu = :estCdPlu"),
    @NamedQuery(name = "Estacao.findByEstCdFlu", query = "SELECT e FROM Estacao e WHERE e.estCdFlu = :estCdFlu"),
    @NamedQuery(name = "Estacao.findByEstIcCampanha", query = "SELECT e FROM Estacao e WHERE e.estIcCampanha = :estIcCampanha"),
    @NamedQuery(name = "Estacao.findByEstCdAdicionalestado", query = "SELECT e FROM Estacao e WHERE e.estCdAdicionalestado = :estCdAdicionalestado"),
    @NamedQuery(name = "Estacao.findByEstCdIgpontopoligono", query = "SELECT e FROM Estacao e WHERE e.estCdIgpontopoligono = :estCdIgpontopoligono"),
    @NamedQuery(name = "Estacao.findByEstCdIgpontolinha", query = "SELECT e FROM Estacao e WHERE e.estCdIgpontolinha = :estCdIgpontolinha"),
    @NamedQuery(name = "Estacao.findByEstCdIggeometria", query = "SELECT e FROM Estacao e WHERE e.estCdIggeometria = :estCdIggeometria"),
    @NamedQuery(name = "Estacao.findByEstResId", query = "SELECT e FROM Estacao e WHERE e.estResId = :estResId"),
    @NamedQuery(name = "Estacao.findByEstIcBasica", query = "SELECT e FROM Estacao e WHERE e.estIcBasica = :estIcBasica"),
    @NamedQuery(name = "Estacao.findByEstIcEnergetica", query = "SELECT e FROM Estacao e WHERE e.estIcEnergetica = :estIcEnergetica"),
    @NamedQuery(name = "Estacao.findByEstIcNavegacao", query = "SELECT e FROM Estacao e WHERE e.estIcNavegacao = :estIcNavegacao"),
    @NamedQuery(name = "Estacao.findByEstTcaId", query = "SELECT e FROM Estacao e WHERE e.estTcaId = :estTcaId"),
    @NamedQuery(name = "Estacao.findByEstTqcId", query = "SELECT e FROM Estacao e WHERE e.estTqcId = :estTqcId"),
    @NamedQuery(name = "Estacao.findByEstCdAdicionalPlu", query = "SELECT e FROM Estacao e WHERE e.estCdAdicionalPlu = :estCdAdicionalPlu"),
    @NamedQuery(name = "Estacao.findByEstCdAdicionalFlu", query = "SELECT e FROM Estacao e WHERE e.estCdAdicionalFlu = :estCdAdicionalFlu")})
public class Estacao implements Serializable {
    private static final long serialVersionUID = 1L;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "EST_ID")
    private BigDecimal estId;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 100)
    @Column(name = "EST_NM")
    private String estNm;
    @Size(max = 8)
    @Column(name = "EST_CD_PLU")
    private String estCdPlu;
    @Size(max = 8)
    @Column(name = "EST_CD_FLU")
    private String estCdFlu;
    @Basic(optional = false)
    @NotNull
    @Column(name = "EST_IC_CAMPANHA")
    private short estIcCampanha;
    @Column(name = "EST_CD_ADICIONALESTADO")
    private Long estCdAdicionalestado;
    @Column(name = "EST_CD_IGPONTOPOLIGONO")
    private BigInteger estCdIgpontopoligono;
    @Column(name = "EST_CD_IGPONTOLINHA")
    private BigInteger estCdIgpontolinha;
    @Column(name = "EST_CD_IGGEOMETRIA")
    private BigInteger estCdIggeometria;
    @Column(name = "EST_RES_ID")
    private BigInteger estResId;
    @Column(name = "EST_IC_BASICA")
    private Short estIcBasica;
    @Column(name = "EST_IC_ENERGETICA")
    private Short estIcEnergetica;
    @Column(name = "EST_IC_NAVEGACAO")
    private Short estIcNavegacao;
    @Column(name = "EST_TCA_ID")
    private BigInteger estTcaId;
    @Column(name = "EST_TQC_ID")
    private BigInteger estTqcId;
    @Size(max = 255)
    @Column(name = "EST_CD_ADICIONAL_PLU")
    private String estCdAdicionalPlu;
    @Size(max = 255)
    @Column(name = "EST_CD_ADICIONAL_FLU")
    private String estCdAdicionalFlu;
    @JoinColumn(name = "EST_STR_ID", referencedColumnName = "STR_ID")
    @ManyToOne(optional = false)
    private StatusRegistro estStrId;

    public Estacao() {
    }

    public Estacao(BigDecimal estId) {
        this.estId = estId;
    }

    public Estacao(BigDecimal estId, String estNm, short estIcCampanha) {
        this.estId = estId;
        this.estNm = estNm;
        this.estIcCampanha = estIcCampanha;
    }

    public BigDecimal getEstId() {
        return estId;
    }

    public void setEstId(BigDecimal estId) {
        this.estId = estId;
    }

    public String getEstNm() {
        return estNm;
    }

    public void setEstNm(String estNm) {
        this.estNm = estNm;
    }

    public String getEstCdPlu() {
        return estCdPlu;
    }

    public void setEstCdPlu(String estCdPlu) {
        this.estCdPlu = estCdPlu;
    }

    public String getEstCdFlu() {
        return estCdFlu;
    }

    public void setEstCdFlu(String estCdFlu) {
        this.estCdFlu = estCdFlu;
    }

    public short getEstIcCampanha() {
        return estIcCampanha;
    }

    public void setEstIcCampanha(short estIcCampanha) {
        this.estIcCampanha = estIcCampanha;
    }

    public Long getEstCdAdicionalestado() {
        return estCdAdicionalestado;
    }

    public void setEstCdAdicionalestado(Long estCdAdicionalestado) {
        this.estCdAdicionalestado = estCdAdicionalestado;
    }

    public BigInteger getEstCdIgpontopoligono() {
        return estCdIgpontopoligono;
    }

    public void setEstCdIgpontopoligono(BigInteger estCdIgpontopoligono) {
        this.estCdIgpontopoligono = estCdIgpontopoligono;
    }

    public BigInteger getEstCdIgpontolinha() {
        return estCdIgpontolinha;
    }

    public void setEstCdIgpontolinha(BigInteger estCdIgpontolinha) {
        this.estCdIgpontolinha = estCdIgpontolinha;
    }

    public BigInteger getEstCdIggeometria() {
        return estCdIggeometria;
    }

    public void setEstCdIggeometria(BigInteger estCdIggeometria) {
        this.estCdIggeometria = estCdIggeometria;
    }

    public BigInteger getEstResId() {
        return estResId;
    }

    public void setEstResId(BigInteger estResId) {
        this.estResId = estResId;
    }

    public Short getEstIcBasica() {
        return estIcBasica;
    }

    public void setEstIcBasica(Short estIcBasica) {
        this.estIcBasica = estIcBasica;
    }

    public Short getEstIcEnergetica() {
        return estIcEnergetica;
    }

    public void setEstIcEnergetica(Short estIcEnergetica) {
        this.estIcEnergetica = estIcEnergetica;
    }

    public Short getEstIcNavegacao() {
        return estIcNavegacao;
    }

    public void setEstIcNavegacao(Short estIcNavegacao) {
        this.estIcNavegacao = estIcNavegacao;
    }

    public BigInteger getEstTcaId() {
        return estTcaId;
    }

    public void setEstTcaId(BigInteger estTcaId) {
        this.estTcaId = estTcaId;
    }

    public BigInteger getEstTqcId() {
        return estTqcId;
    }

    public void setEstTqcId(BigInteger estTqcId) {
        this.estTqcId = estTqcId;
    }

    public String getEstCdAdicionalPlu() {
        return estCdAdicionalPlu;
    }

    public void setEstCdAdicionalPlu(String estCdAdicionalPlu) {
        this.estCdAdicionalPlu = estCdAdicionalPlu;
    }

    public String getEstCdAdicionalFlu() {
        return estCdAdicionalFlu;
    }

    public void setEstCdAdicionalFlu(String estCdAdicionalFlu) {
        this.estCdAdicionalFlu = estCdAdicionalFlu;
    }

    public StatusRegistro getEstStrId() {
        return estStrId;
    }

    public void setEstStrId(StatusRegistro estStrId) {
        this.estStrId = estStrId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (estId != null ? estId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Estacao)) {
            return false;
        }
        Estacao other = (Estacao) object;
        if ((this.estId == null && other.estId != null) || (this.estId != null && !this.estId.equals(other.estId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return this.estNm;
    }
    
}
